package com.healthcloud.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.healthcloud.entity.Hospital;
import com.healthcloud.utils.PageParam;

public interface HospitalMapper extends CRUDMapper<Hospital, Long> {
    List<Hospital> listByIds(@Param("ids") List<Long> ids);
    int logicalDelete(@Param("id") Long id);

    List<Hospital> getHospitalListByAreaCode(@Param("areaCode") String areaCode,@Param("hosType") Integer hosType);

    List<Hospital> searchCommunity(@Param("entity") Hospital entity, @Param("pageParam")PageParam pageParam);

    int countCommunity(@Param("entity") Hospital entity);

    Hospital getSuperiorHosp(@Param("id") Long id);

    List<Hospital> getAffiliatedHosp(@Param("id") Long id);

    List<Hospital> getHospitalsByDrId(@Param("drId") Long drId);

    List<Hospital> getHospitalsByUserId(@Param("userId") Long userId);
    
    List<Hospital> searchByName(@Param("name") String name, @Param("offset") String offset, @Param("limit") String limit);
    
    int countByName(@Param("name") String name, @Param("offset") String offset, @Param("limit") String limit);
}
